local Lua__hongwen = fk.CreateSkill({
  name = "Lua__hongwen",
  tags = {Skill.Compulsory}
})

Fk:loadTranslationTable{
  ["Lua__hongwen"] = "红温",
  [":Lua__hongwen"] = "锁定技，你始终处于【酒】状态。",
}

Lua__hongwen:addEffect(fk.GamePrepared, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(Lua__hongwen.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player.drank = 1
    room:broadcastProperty(player, "drank")
  end,
})

Lua__hongwen:addEffect(fk.AfterCardUseDeclared, {
    can_refresh = function (self, event, target, player, data)
      return target == player and player.drank == 0 and player:hasSkill(Lua__hongwen.name)
    end,
    on_refresh = function (self, event, target, player, data)
      player.drank = 1
      player.room:broadcastProperty(player, "drank")
    end,
  })

  Lua__hongwen:addEffect(fk.EventTurnChanging, {
    can_refresh = function (self, event, target, player, data)
      return player:hasSkill(Lua__hongwen.name) and player.drank == 0
    end,
    on_refresh = function (self, event, target, player, data)
      player.drank = 1
      player.room:broadcastProperty(player, "drank")
    end,
  })

return Lua__hongwen 